import torch
from ultralytics import YOLO

# 检查PyTorch是否可用
if torch.cuda.is_available():
    print("GPU available: ", torch.cuda.get_device_name(0))
else:
    print("CPU mode")

# 检查YOLO是否能加载
model = YOLO('yolov8n.pt')
print("yolo model loaded")